
class Testing

  require "test/unit"

  class TestCase < ::Test::Unit::TestCase
    @@test_cases ||= {}

    def self.run
      ::Test::Unit::UI::Html::TestRunner.run(self)
    end

    def assert_equal actual, expected, message = nil
      super(expected, actual, message)
    end

    def self.run_to_html
      ::Test::Unit::UI::Html::TestRunner.run(self)
    end

    def eq *a
      assert_equal *a
    end

    def self.inherited who
      kind = who.ancestors[1]
      @@test_cases[kind] ||= {}
      @@test_cases[kind][who] = true
    end

    def self.all
      if @@test_cases[self]
        @@test_cases[self].keys.sort { |a, b| a.to_s <=> b.to_s }
      else
        []
      end
    end
  end

  class ::AppTest < Testing::TestCase; end

  class ::FwTest < Testing::TestCase; end


  class Test < FwTest
    def test_something
      assert true
    end
  end
end
